const KEY = 'hm-tt-pc-userinfo'
//  存储用户信息
const setUser = (user) => {
  localStorage.setItem(KEY, JSON.stringify(user))
}

/**
 * 取出用户信息
 */
const getUser = () => {
  const result = JSON.parse(localStorage.getItem(KEY)) || {}
  // console.log('getuser', result)
  return result
}

export {
  setUser,
  getUser
}
